import 'dart:io';

import 'package:erp/DataInterface/HttpInterfaces.dart';
import 'package:erp/Entity/RequestBuilderModel.dart';
import 'package:erp/EventBus/EventBus.dart';
import 'package:erp/Events/EventAddrs.dart';
import 'package:shared_preferences/shared_preferences.dart';

final globalBus = EventBus.singleton(key: "application");
var externalInterface = HttpInterfaces();
SharedPreferences globalPreferences;

void log(Object message, {Object context}){
  message = "\n****************$context LOG ****************"
      "\n"
      "$message"
      "\n"
      "**************** LOG END ****************\n";
  globalBus.publish("application.log.printed", message);
}
void applyLogger(){
  globalBus.subscribeIfNotExists("application.log.printed", (bus, message){
    print(message);
  });
}
